package com.chen.service.impl;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.chen.mapper.ContactMethodsMapper;
import com.chen.pojo.entity.ContactMethods;
import com.chen.service.ContactMethodsService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 陈子安
 * @since 2023-11-30
 */
@Service
public class ContactMethodsServiceImpl extends ServiceImpl<ContactMethodsMapper, ContactMethods> implements ContactMethodsService {

    @Override
    public List<ContactMethods> getContactMethodsByPersonId(List<Integer> ids) {
        LambdaUpdateWrapper<ContactMethods> wrapper = new LambdaUpdateWrapper<>();
        wrapper.in(ContactMethods::getPersonId, ids);
        return list(wrapper);

    }
}
